package AST;
import java.util.ArrayList;

public class IDList {
	private ArrayList<ID> idList;
	public IDList(){
		idList = new ArrayList<ID>();
	}
	public IDList(ArrayList<ID> idLsit){
		this.idList = idList;
	}
	public void assign(ID newID){
		if (!idList.contains(newID)){
			idList.add(newID);
		}
		else{
			//find and assign
		}
	}
	public Object getID(String name){
		for (int i = 0; i< idList.size();i++){
			if (idList.get(i).getName().equals(name)){
				return idList.get(i).getValue();
			}
		}
		return null;
	}
	public ArrayList<ID> getIdList(){
		return idList;
	}
}
